@extends('layout.main')

@section('css')
<link rel="stylesheet" href="/assets/js/plugins/jstree/themes/default/style.min.css" />
@endsection

@section('content')
<div class="row">
    <div class="col-lg-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>菜单列表</h5>
                <div class="ibox-tools">
                    <a class="collapse-link">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                    <a class="close-link">
                        <i class="fa fa-times"></i>
                    </a>
                </div>
            </div>
            <div class="ibox-content">

                <div id="menutree"></div>

            </div>
        </div>
    </div>
</div>
@endsection

@section('js')
<script src="/assets/js/plugins/jstree/jstree.min.js"></script>
<script type="text/javascript">
    $(function(){
        $('#menutree').jstree({ 
            'core' : {
                'themes' : { "icons":false},
                'data' : {!!$jsontv!!}
            }
        });
    })
</script>
@endsection